<!DOCTYPE HTML>
<html>
      <head>
            <meta charset="utf-8">
            <meta name="viewport" content="initial-scale=1, maximum-scale=1">
            <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
            <script type="text/javascript" src="/admins/js/jquery/jquery-1.7.2.min.js"></script>
            <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
            <script src="/soundmanagerv/script/soundmanager2.js"></script>
            <style>
                  .radio{
                        width: 200px;
                        float: left;
                        margin-left: 5px;
                  }
                  #form1 .ui-grid-b>:nth-child(n){
                        width: 150px;
                  }
            </style>
      </head>
      <body>
            <div data-role="page" id="page1">
                  <div data-theme="a" data-role="header">
                        <a data-role="button" href="javascript:goback();" class="ui-btn-left">
                              返回
                        </a>
                        <h3>
                              悠奇-商品条码扫描
                        </h3>
                  </div>
                  <form id="form1"  name="form1" action="/admini/packageno/index" method="post" > 
                        <div class="ui-grid-a">
                              <div class="ui-block-a">
                                    <label for="quick">&nbsp;&nbsp;所有公司名称：</label><select id="comname" name="comname">
                                          <?php foreach ($this->shipAll as $shipVal) { ?>
                                                <option value="<?php echo $shipVal->Id; ?>"><?php echo $shipVal->name; ?></option>
                                          <?php } ?>
                                    </select>
                              </div>
                              <!--                      <div class="ui-block-b">
                                                      常用快递公司名称：
                                                      <select id="courier">
                                                            <option value="11">圆通</option>
                                                            <option value="9">申通</option>
                                                            <option value="8">中通</option>
                                                            <option value="13">韵达</option>
                                                            <option value="21">顺丰</option>
                                                            <option value="14">天天</option>
                                                            <option value="174">国通</option>
                                                            <option value="15">汇通</option>
                                                            <option value="110">优速</option>
                                                            <option value="0">    </option>
                                                      </select>       
                                                </div>-->
                        </div>
                        常用公司名称：
                        <div class="ui-grid-b">
                              <div class="ui-block-a">
                                    <label><input class='invoice' name="searchType" type="radio" value="11" i="圆通速递">圆通速递</label></div>
                              <div class="ui-block-b">
                                    <label><input class='invoice' name="searchType" type="radio" value="9" i="申通">申通</label></div>
                              <div class="ui-block-c">
                                    <label><input class='invoice' name="searchType" type="radio" value="8" i="中通速递">中通速递</label></div>
                              <div class="ui-block-d">
                                    <label><input class='invoice' name="searchType" type="radio" value="13" i="韵达快运">韵达快运</label>
                              </div>
                              <div class="ui-block-d">
                                    <label><input class='invoice' name="searchType" type="radio" value="21" i="顺丰速递">顺丰速递</label></div>
                              <div class="ui-block-a">
                                    <label><input class='invoice' name="searchType" type="radio" value="14" i="天天快递">天天快递</label></div>
                              <div class="ui-block-b">
                                    <label><input class='invoice' name="searchType" type="radio" value="174" i="国通快递">国通快递</label></div>
                              <div class="ui-block-c">
                                    <label><input class='invoice' name="searchType" type="radio" value="15" i="汇通快运">汇通快运</label>
                              </div>
                              <div class="ui-block-d">
                                    <label><input class='invoice' name="searchType" type="radio" value="110" i="优速物流">优速物流</label>
                              </div>
                              <div class="ui-block-d">
                                    <label><input class='invoice' name="searchType" type="radio" value="16" i="速尔物流">速尔物流</label>
                              </div>
                        </div>
                        <div data-role="fieldcontain" id="code">
                              <label for="barcode">
                                    请扫描商品条码
                              </label>
              <!--                <input name="barcode" id="barcode" placeholder="请扫描商品条码" value="" type="text">-->
                              <textarea name="barcode2" style="height:100px;" id="barcode2" required=""></textarea>
                        </div>
                        <div id="restext" style="padding:10px 40px;">

                        </div>
                        <div class="ui-grid-a" id="bang">
                              <div class="ui-block-a">
                                    <input type="button" id="submit1" value="确定">
                              </div>
                              <div class="ui-block-b">
                                    <input type="reset" value="清空">
                              </div>
                        </div>
                  </form>
            </div>

            <script type="text/javascript">
                  $("#barcode2").val("");
                  $("#comname option[value=11]").attr("selected", true);
                  $("#comname").change(function() {
                        $(".invoice").val("");
                        $("#barcode2").focus();
                  });
                  $(".invoice").click(function() {
                        //                  $("#barcode2").focus();
                        var checkname = $(this).attr("i");
                        var checkid = $(this).val();
                        $("#comname").find("option[value='" + checkid + "']").attr("selected", "true");
                        $(".ui-btn-inner .ui-btn-text span").text(checkname);
                        //$(".ui-btn-inner span").html(checkname);
                  });
                  $("#submit1").click(function() {
                        if ("" == $("#barcode2").val())
                        {
                              alert("清扫描商品条码！");
                        }
                        else {
                              $("#form1").submit();
                        }
                  });
                  function goback() {
                        window.location.href = "/admini/managelogin/tabletlist";
                  }
            </script>
      </body>
</html>

